package com.ruoyi.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.web.domain.entity.Department;
import com.ruoyi.web.domain.vo.DepartmentVo;
import com.ruoyi.web.mapper.DepartmentMapper;
import com.ruoyi.web.service.teacher.topicInfo.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 系部表(Department)表服务实现类
 *
 * @author makejava
 * @since 2022-11-01 20:04:27
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    /**
     * 查询所有专业
     * @return
     */
    @Override
    public R getDepartmentList() {
        List<Department> departments = new ArrayList<>();
        departments = list();
        List<DepartmentVo> departmentVoList = BeanUtils.copyBeanList(departments, DepartmentVo.class);
        return R.ok(departments);
    }

}

